package com.ougy.reshop.model.converter;

import java.util.Map;

import com.ougy.reshop.model.Region;

public class RegionConverter extends BaseStrutsTypeConverter{
	@Override
	public Object convertFromString(Map arg0, String[] arg1, Class arg2) {
		int regionId=Integer.parseInt(arg1[0]);
		Region region=sRegion.load(regionId);
		return region;
	}
	@Override
	public String convertToString(Map arg0, Object arg1) {
		Region region=(Region) arg1;
		return region.getName();
	}
	
}
